<template>
  <el-tabs v-model="activeName" @tab-click="handleClick" tabPosition="left" >
    <template v-for="banker in bankers">
      <el-tab-pane :label="banker.name" :name="'banker_'+banker.id">
        <div style="height: 100%">
          <CustOddsSetting :banker-id="banker.id" :cust-id="custId" :cust-type="custType"/>
        </div>
      </el-tab-pane>
    </template>
  </el-tabs>
</template>
<script>
import CustOddsSetting from "../CustOddsPanel/setting.vue"
export default {
  dicts: ['play_type'],
  components:{CustOddsSetting},
  name: 'CustOddsPanel',
  props: {
    custId: {
      type: Number,
      default: null
    },
    custType:{
      type:String,
      default: '1'
    },
    bankers: {
      type: Array,
      default: null
    },
    value: [Number, String, Array]
  },
  data() {
    return {
      activeName: '',
      oddsList: [
        { 'key': 'TM', label: '特码', value: 1, name: '特码标准赔率' },
        { 'key': 'MZ', label: '平码', value: 1, name: '平码标准赔率' }
      ],
      oddsRules: {
        'TM': [{ id: 1, name: '特码', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'MZ': [{ id: 2, name: '码仔', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'WBZ': [{ id: 2, name: '五不中', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'WZY': [{ id: 2, name: '五中一', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'SZS': [{ id: 2, name: '三中三', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'SZE': [{ id: 2, name: '三中二', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'EZE': [{ id: 2, name: '二中二', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'LVB': [{ id: 2, name: '绿波', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'HONDB': [{ id: 2, name: '红波', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'LANB': [{ id: 2, name: '蓝波', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'FIVE_ZODIAC': [{ id: 2, name: '五肖', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'FOUR_ZODIAC': [{ id: 2, name: '四肖', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'THREE_ZODIAC': [{ id: 2, name: '三肖', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'TWO_ZODIAC': [{ id: 2, name: '二肖', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'ONE_ZODIAC': [{ id: 2, name: '一肖', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }],
        'TC': [{ id: 3, name: '特串1', upOdds: 100, downOdds: 100, upWaterRate: 0.08, downWaterRate: 0.08 }, {
          id: 4,
          name: '特串2',
          upOdds: 100,
          downOdds: 100,
          upWaterRate: 0.08,
          downWaterRate: 0.08
        }]
      },

      checkList: {
        'TM': ''
      }

    }
  },
  created() {
    if (this.bankers && this.bankers.length > 0) {
      this.activeName = 'banker_' + this.bankers[0].id
    }
  },
  computed: {},
  methods: {
    handleClick(tab, event) {
      console.log(tab, event)
    }
  },
  filters: {}
}
</script>
